package com.zking.ssm.service.impl;

import com.zking.ssm.mapper.SysUserMapper;
import com.zking.ssm.model.SysRoler;
import com.zking.ssm.model.SysUser;
import com.zking.ssm.service.ISysUserService;
import com.zking.ssm.utils.PageBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SysUserServiceImpl implements ISysUserService {

    @Autowired
    private SysUserMapper sysUserMapper;

    @Override
    public int deleteByPrimaryKey(Long userId) {
        return sysUserMapper.deleteByPrimaryKey(userId);
    }

    @Override
    public int insert(SysUser record) {
        return sysUserMapper.insert(record);
    }

    @Override
    public int insertSelective(SysUser record) {
        return sysUserMapper.insertSelective(record);
    }

    @Override
    public SysUser selectByPrimaryKey(Long userId) {
        return sysUserMapper.selectByPrimaryKey(userId);
    }

    @Override
    public int updateByPrimaryKeySelective(SysUser record) {
        return sysUserMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(SysUser record) {
        return sysUserMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<SysUser> selectAll(SysUser sysUser, PageBean pageBean) {
        return sysUserMapper.selectAll(sysUser);
    }


    @Override
    public SysUser login(SysUser sysUser) {
        return sysUserMapper.login(sysUser);
    }

    @Override
    public int updateUser(SysUser record) {
        return sysUserMapper.updateUser(record);
    }

    @Override
    public int updatePassword(SysUser record) {
        return sysUserMapper.updatePassword(record);
    }

}
